#!user/bin/env python3
# -- coding: utf-8 --
# @Createtime：2023/11/18
# @Updatetime：16:10
# @Author：Test008
# @File：page_home.py
# @Description：
"""全景视图页面"""
import time

from base.base_conf import Base
from page.seles.sele_menulock import EleMenuLock

"""全景视图锁屏功能"""


class MenuLock(Base):
    # 点击收起按钮
    def menu_click_icon(self):
        self.base_click(EleMenuLock.menu_icon)

    # 点击锁屏
    def menulock_click_lock_screen(self):
        self.base_click(EleMenuLock.lock_screen)

    # 输入锁屏密码
    def menulock_input_lock_password(self, pass_word):
        self.base_input(EleMenuLock.lock_password, pass_word)

    # 点击密码设置取消
    def menulock_click_cancel_btn(self):
        self.base_click(EleMenuLock.lock_cancel_btn)

    # 点击密码设置确定
    def menulock_click_confirm_btn(self):
        self.base_click(EleMenuLock.lock_confirm_btn)

    # 点击解锁中的退出系统
    def menulock_click_unlock_out_system(self):
        self.base_click(EleMenuLock.unlock_out_system)

    # 点击取消退出系统
    def menulock_click_unlock_cancel_out_sys(self):
        self.base_click(EleMenuLock.unlock_cancel_out_sys)

    # 输入解锁密码
    def menulock_input_unlock_password(self, pass_word):
        self.base_input(EleMenuLock.unlock_input_unlock, pass_word)

    # 点击确定解锁
    def menulock_click_unlock_confirm(self):
        self.base_click(EleMenuLock.unlock_confirm)

    # 组合业务方法
    def page_menu_lock(self, pass_word):
        self.menu_click_icon()
        self.menu_click_icon()
        self.menulock_click_lock_screen()
        time.sleep(1)
        self.menulock_click_cancel_btn()
        time.sleep(1)
        self.menulock_click_lock_screen()
        time.sleep(1)
        self.menulock_input_lock_password(pass_word)
        self.menulock_click_confirm_btn()
        self.menulock_click_unlock_out_system()
        self.menulock_input_unlock_password(pass_word)
        self.menulock_click_unlock_confirm()


